//导入 用layui upload插件
layui.use([ "element", "laypage", "layer", "upload"], function() {
    var element = layui.element;
    var laypage = layui.laypage;
    var layer = layui.layer;
    var upload = layui.upload;//主要是这个
    upload.render({
        elem: "#importData",//导入id
        url: "/seller/order/importorder",
        size: '3072',//允许上传3M
        multiple: false,//多文件上传
        accept: "file",
        exts: 'xls|xlsx',
        done: function (data) {
        	if(data.flag){
    	        layer.msg(data.msg, {icon: 1, time: 2000}, function(){
    	        	var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
    	        	parent.layer.close(index); //再执行关闭
    	        	window.parent.$("#queryBySellerNameBtn").click();
    	        });
        	} else {
        		layer.msg(data.msg, {icon: 5}); 
        	}
        }
    });
});